home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat2 / standard / shmctl.z / shmctl
Encoding:
Text File  |  1998-10-20  |  8.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. sssshhhhmmmmccccttttllll((((2222))))                                                            sssshhhhmmmmccccttttllll((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ssss_hhhh_mmmm_cccc_tttt_llll - shared memory control operations
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_iiii_pppp_cccc_...._hhhh_>>>>
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_ssss_hhhh_mmmm_...._hhhh_>>>>
  15.  
  16.      _iiii_nnnn_tttt _ssss_hhhh_mmmm_cccc_tttt_llll _((((_iiii_nnnn_tttt _ssss_hhhh_mmmm_iiii_dddd_,,,, _iiii_nnnn_tttt _cccc_mmmm_dddd_,,,, _...._...._...._////_**** _ssss_tttt_rrrr_uuuu_cccc_tttt _ssss_hhhh_mmmm_iiii_dddd______dddd_ssss _****_bbbb_uuuu_ffff _****_////_))))_;;;;
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      _ssss_hhhh_mmmm_cccc_tttt_llll provides a variety of shared memory control operations as
  20.      specified by _c_m_d.  The following _c_m_ds are available:
  21.  
  22.      _IIII_PPPP_CCCC______SSSS_TTTT_AAAA_TTTT    Place the current value of each member of the data structure
  23.                  associated with _s_h_m_i_d into the structure pointed to by _b_u_f.
  24.                  The contents of this structure are defined in _iiii_nnnn_tttt_rrrr_oooo(2).
  25.                  {READ}
  26.  
  27.      _IIII_PPPP_CCCC______SSSS_EEEE_TTTT     Set the value of the following members of the data structure
  28.                  associated with _s_h_m_i_d to the corresponding value found in the
  29.                  structure pointed to by _b_u_f:
  30.  
  31.                      _ssss_hhhh_mmmm______pppp_eeee_rrrr_mmmm_...._uuuu_iiii_dddd
  32.                      _ssss_hhhh_mmmm______pppp_eeee_rrrr_mmmm_...._gggg_iiii_dddd
  33.                      _ssss_hhhh_mmmm______pppp_eeee_rrrr_mmmm_...._mmmm_oooo_dddd_eeee _////_**** _oooo_nnnn_llll_yyyy _aaaa_cccc_cccc_eeee_ssss_ssss _pppp_eeee_rrrr_mmmm_iiii_ssss_ssss_iiii_oooo_nnnn _bbbb_iiii_tttt_ssss _****_////
  34.  
  35.                  This command can be executed only by a process that has an
  36.                  effective user ID equal to the value of _ssss_hhhh_mmmm______pppp_eeee_rrrr_mmmm_...._cccc_uuuu_iiii_dddd or
  37.                  _ssss_hhhh_mmmm______pppp_eeee_rrrr_mmmm_...._uuuu_iiii_dddd in the data structure associated with _s_h_m_i_d or
  38.                  to a process that has the _ssss_uuuu_pppp_eeee_rrrr_----_uuuu_ssss_eeee_rrrr privilege.
  39.  
  40.      _IIII_PPPP_CCCC______RRRR_MMMM_IIII_DDDD    Remove the shared memory identifier specified by _s_h_m_i_d from
  41.                  the system and destroy the shared memory segment and data
  42.                  structure associated with it.  This command can be executed
  43.                  only by a process that has an effective user ID equal to the
  44.                  value of _ssss_hhhh_mmmm______pppp_eeee_rrrr_mmmm_...._cccc_uuuu_iiii_dddd or _ssss_hhhh_mmmm______pppp_eeee_rrrr_mmmm_...._uuuu_iiii_dddd in the data structure
  45.                  associated with _s_h_m_i_d or to a process that has the _ssss_uuuu_pppp_eeee_rrrr_----_uuuu_ssss_eeee_rrrr
  46.                  privilege.
  47.  
  48.      _SSSS_HHHH_MMMM______LLLL_OOOO_CCCC_KKKK    Lock the shared memory segment specified by _s_h_m_i_d in memory.
  49.                  This command can be executed only by a process that has the
  50.                  _ssss_uuuu_pppp_eeee_rrrr_----_uuuu_ssss_eeee_rrrr privilege.  Locking occurs per address space;
  51.                  multiple processes or sprocs mapping the area at different
  52.                  addresses each need to issue the lock (this is primarily an
  53.                  issue with the per-process page tables).
  54.  
  55.      _SSSS_HHHH_MMMM______UUUU_NNNN_LLLL_OOOO_CCCC_KKKK  Unlock the shared memory segment specified by _s_h_m_i_d.  This
  56.                  command can be executed only by a process that has the
  57.                  _ssss_uuuu_pppp_eeee_rrrr_----_uuuu_ssss_eeee_rrrr privilege.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. sssshhhhmmmmccccttttllll((((2222))))                                                            sssshhhhmmmmccccttttllll((((2222))))
  71.  
  72.  
  73.  
  74.      _ssss_hhhh_mmmm_cccc_tttt_llll fails if one or more of the following are true:
  75.  
  76.      _EEEE_AAAA_CCCC_CCCC_EEEE_SSSS      _c_m_d is equal to _IIII_PPPP_CCCC______SSSS_TTTT_AAAA_TTTT and {READ} operation permission is
  77.                  denied to the calling process [see _iiii_nnnn_tttt_rrrr_oooo(2)].
  78.  
  79.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL      _s_h_m_i_d is not a valid shared memory identifier.
  80.  
  81.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL      _c_m_d is not a valid command.
  82.  
  83.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL      _c_m_d is _IIII_PPPP_CCCC______SSSS_EEEE_TTTT and _ssss_hhhh_mmmm______pppp_eeee_rrrr_mmmm_...._uuuu_iiii_dddd or _ssss_hhhh_mmmm______pppp_eeee_rrrr_mmmm_...._gggg_iiii_dddd is not valid.
  84.  
  85.      _EEEE_OOOO_VVVV_EEEE_RRRR_FFFF_LLLL_OOOO_WWWW   _c_m_d is _IIII_PPPP_CCCC______SSSS_TTTT_AAAA_TTTT and _u_i_d or _g_i_d is too large to be stored in
  86.                  the structure pointed to by _b_u_f.
  87.  
  88.      _EEEE_PPPP_EEEE_RRRR_MMMM       _c_m_d is equal to _IIII_PPPP_CCCC______RRRR_MMMM_IIII_DDDD or _IIII_PPPP_CCCC______SSSS_EEEE_TTTT and the effective user is
  89.                  not equal to the value of _ssss_hhhh_mmmm______pppp_eeee_rrrr_mmmm_...._cccc_uuuu_iiii_dddd or _ssss_hhhh_mmmm______pppp_eeee_rrrr_mmmm_...._uuuu_iiii_dddd in
  90.                  the data structure associated with _s_h_m_i_d and the process does
  91.                  not have the _ssss_uuuu_pppp_eeee_rrrr_----_uuuu_ssss_eeee_rrrr privilege.
  92.  
  93.      _EEEE_PPPP_EEEE_RRRR_MMMM       _c_m_d is equal to _SSSS_HHHH_MMMM______LLLL_OOOO_CCCC_KKKK or _SSSS_HHHH_MMMM______UUUU_NNNN_LLLL_OOOO_CCCC_KKKK and the calling
  94.                  process does not have the _ssss_uuuu_pppp_eeee_rrrr_----_uuuu_ssss_eeee_rrrr privilege.
  95.  
  96.      _EEEE_FFFF_AAAA_UUUU_LLLL_TTTT      _b_u_f points to an illegal address.
  97.  
  98.      _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM      _c_m_d is equal to _SSSS_HHHH_MMMM______LLLL_OOOO_CCCC_KKKK and there is not enough memory.
  99.  
  100. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  101.      _ssss_hhhh_mmmm_gggg_eeee_tttt(2), _ssss_hhhh_mmmm_oooo_pppp(2).
  102.  
  103. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  104.      Upon successful completion, a value of 0 is returned. Otherwise, a value
  105.      of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to indicate the error.
  106.  
  107. NNNNOOOOTTTTEEEESSSS
  108.      The user must explicitly remove shared memory segments after the last
  109.      reference to them has been removed.
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.